<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
	<style>
		body, input{
			font-family: Calibri, Arial;
		}
		table#contact {
			border-collapse: collapse;
			width:550px;
		}
		th {
			height: 40px;
			background-color: #ffee55;
		}
	</style>
	<title>Products - Struts2 Hibernate</title>
</head>
<body>

<h1>Add Product</h1>
<s:actionerror/>

<s:form action="add" method="post">
	<s:textfield name="product.description" label="description"/>
	<s:textfield name="product.price" label="price"/>
	<s:submit value="Add Product" align="center"/>
</s:form>





<h2>Products</h2>
<table id="product" border="1">
<tr>
	<th>Description</th>
	<th>Price</th>
	<th>Delete</th>
</tr>
<s:iterator value="productList" var="product">
	<tr>
		<td><s:property value="description"/></td>
		<td><s:property value="price"/></td>
		<td><a href="delete?id=<s:property value="id"/>">delete</a></td>
	</tr>	
</s:iterator>
</table>
</body>
</html>